
// myBoard_SWUpdate_vcDlg.h : header file
//

#pragma once
#include "afxwin.h"
#include "my_main.h"
#include "afxdtctl.h"
#include "atltime.h"


// CmyBoard_SWUpdate_vcDlg dialog
class CmyBoard_SWUpdate_vcDlg : public CDialogEx
{
// Construction
public:
	CmyBoard_SWUpdate_vcDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_MYBOARD_SWUPDATE_VC_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedCancel();
	CListBox m_list_log;

	void Show_Log(CString s);
	void Show_Log(const char *fmt, ...);
	void Show_Board_Code_Version();
	void Show_Board_DS_Info();
	void SPI_Write_Enable(u8 is_en);
	void SPI_Erase_Bulk();
	void SPI_Erase_Sector(u8 index);
	void SPI_Page_Read(u16 page_index, u8 *tx_page_buf);
	bool SPI_Page_Write(u16 page_index, u8 *tx_page_buf);
	void SPI_StatReg_Read(u8 *p_value);
	CString Get_Self_Exe_Dir();

	afx_msg void OnTimer(UINT_PTR nIDEvent);
	
	afx_msg void OnBnClickedBtnShowBoardDate();
	afx_msg void OnBnClickedBtnReadTout();
	afx_msg void OnBnClickedBtnSetTout();
	CString m_edit_exp_set;
	CDateTimeCtrl m_dtp_exp;
	CTime m_pickerTime;
	void ReadToutStat();
};
